using System.Collections.Generic;

namespace PropertyExpression.TypedDataBinding.Web.Example.Exapmle1.Model
{
    public class A: IdOwner
    {
        public A(int id) : base(id)
        {
            A001 = "Test" + id;
        }

        public string A001 { get; set; }

        public IEnumerable<B> Bs
        {
            get
            {
                foreach (B b in DataFactory.Instance.GetAll<B>())
                {
                    if (b.AId == Id)
                    {
                        yield return b;
                    }
                }
            }
        }
    }
}